package org.feiye.studyday24;

import java.io.File;
import java.util.Date;

public class IoTest1 {

	public static void main(String[] args) {
		File f = new File("F:\\Java课件");
		if (f.exists()) {
			if (f.isDirectory()) {
				System.out.println("绝对路径：" + f.getAbsolutePath());
				System.out.println("目录名：" + f.getName());
				System.out.println("目录大小：" + f.length());
				System.out.println("目录修改时间：");
				long time = f.lastModified();
				Date d = new Date(time);
				System.out.println(d);
				System.out.println("-----------------------------------------------");
				String[] list = f.list();
				for (String string : list) {
					System.out.print(string + "\t");
				}
				System.out.println();
				System.out.println();
				File[] listFiles = f.listFiles();
				for (File file : listFiles) {
					System.out.print(file + "\t");
				}
			}
		}
	}

}
